<template>
	<view>
		<view class="top">
			监控设备
		</view>
		<view class="box">
			<view class="item" v-for="(item,index) in listData" :key="index">
				<view class="left">
					<text>{{item.robot}}</text>
					<text>心跳频率：{{item.number}}/次</text>
					<text>所属公司：青岛百杉集团有限公司</text>
				</view>
				<view class="right">
					<view v-if="item.state==true" :class="item.state==true?'right_red':''">
						未发布
					</view>
					<view v-if="item.state==false" :class="item.state==false?'right_blue':''">
						已发布
					</view>
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				listData: [{
					robot: "热能表",
					state: false,
					number: "5分钟",
				}, {
					robot: "水表",
					state: true,
					number: "30秒",
				}, {
					robot: "压缩空气",
					state: true,
					number: "1分钟",
				}, {
					robot: "电表",
					state: false,
					number: "1分钟",
				}, {
					robot: "蒸汽表",
					state: true,
					number: "1分钟",
				}, {
					robot: "水质表",
					state: true,
					number: "10秒",
				}, {
					robot: "电压力表",
					state: false,
					number: "1分钟",
				}, {
					robot: "机芯",
					state: true,
					number: "A型产品",
				}]
			}
		},
		methods: {

		},
		onShow() {

		}
	}
</script>

<style lang="scss" scoped>
	.top {
		width: 100%;
		height: 40px;
		line-height: 40px;
		background-color: #5479FF;
		height: 40px;
		align-items: center;
		color: #fff;
		text-align: center;
	}

	.tabbarHade {
		background-color: #5479FF;
		display: flex;
		flex-direction: row;
		align-items: center;
		color: #fff;

		img {
			width: 100rpx;
		}
	}

	.box {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding: 40rpx;

		.item {
			width: 100%;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			margin-bottom: 20rpx;
			box-shadow: 5px 5px 50px 0px rgba(206, 207, 219, 1);
			padding: 20rpx;
			border-radius: 10rpx;
			box-sizing: border-box;

			.left {
				display: flex;
				flex-direction: column;

			}

			.right {
				width: 100rpx;
				height: 50rpx;

				view {
					text-align: center;
					border-radius: 20rpx;
					color: #fff;
				}

				.right_red {
					background-color: #ccc;
				}

				.right_blue {
					background-color: skyblue;
				}
			}

		}
	}
</style>